import service from '@/utils/request'

// @Tags WorkflowData
// @Summary 创建审批数据
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowData true "创建审批数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /WorkflowData/createWorkflowData [post]
export const createWorkflowData = (data) => {
  return service({
    url: '/WorkflowData/createWorkflowData',
    method: 'post',
    data
  })
}

// @Tags WorkflowData
// @Summary 删除审批数据
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowData true "删除审批数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /WorkflowData/deleteWorkflowData [delete]
export const deleteWorkflowData = (params) => {
  return service({
    url: '/WorkflowData/deleteWorkflowData',
    method: 'delete',
    params
  })
}

// @Tags WorkflowData
// @Summary 批量删除审批数据
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除审批数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /WorkflowData/deleteWorkflowData [delete]
export const deleteWorkflowDataByIds = (params) => {
  return service({
    url: '/WorkflowData/deleteWorkflowDataByIds',
    method: 'delete',
    params
  })
}

// @Tags WorkflowData
// @Summary 更新审批数据
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowData true "更新审批数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /WorkflowData/updateWorkflowData [put]
export const updateWorkflowData = (data) => {
  return service({
    url: '/WorkflowData/updateWorkflowData',
    method: 'put',
    data
  })
}

// @Tags WorkflowData
// @Summary 用id查询审批数据
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.WorkflowData true "用id查询审批数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /WorkflowData/findWorkflowData [get]
export const findWorkflowData = (params) => {
  return service({
    url: '/WorkflowData/findWorkflowData',
    method: 'get',
    params
  })
}

// @Tags WorkflowData
// @Summary 分页获取审批数据列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取审批数据列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /WorkflowData/getWorkflowDataList [get]
export const getWorkflowDataList = (params) => {
  return service({
    url: '/WorkflowData/getWorkflowDataList',
    method: 'get',
    params
  })
}
